package com.db.patterns.prototype.demo01;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@Data
public class Client {
    public static void main(String[] args) throws CloneNotSupportedException {
        Resume resume1 = new Resume();
        resume1.setName("小兵");
        resume1.setAge(25);
        resume1.setGender("男");
        resume1.setWorkExperience(new WorkExperience("2023-2024", "北京xxx公司任职Java开发工程师"));

        Resume resume2 = resume1.clone();
        resume2.getWorkExperience().setTimeArea("深圳XXX医疗公司");
        log.info("resume1: {}", resume1);
        log.info("resume2: {}", resume2);
        log.info("resume1 == resume2 ?  {}", (resume2 == resume1));
    }
}
